import time


# 时间戳转字符串日期
def stamp2str(a):
    return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(a))


def str2stamp(a):
    return time.mktime(time.strptime(a, '%Y-%m-%d %H:%M:%S'))


